package com.kalvan.web.exception;

import com.kalvan.core.exception.ReturnCode;

/**
 * web系统错误代码定义
 *
 * @author chenliang
 */
public interface AdminReturnCode {

    /**
     * 异常返回
     */
    ReturnCode REQUEST_ILLEGAL = new ReturnCode("9000", "非法请求");
    ReturnCode PARAM_NOT_NULL = new ReturnCode("9001", "{0}不能为空");
    ReturnCode PARAM_ILLEGAL = new ReturnCode("9002", "{0}参数不合法");
    ReturnCode PARAM_REGION_OVER = new ReturnCode("9003", "{0}超过范围{1}");

    ReturnCode DATA_NOT_EXISTS = new ReturnCode("9010", "{0}记录不存在");
    ReturnCode DATA_REPEAT = new ReturnCode("9011", "{0}记录已存在");
    ReturnCode DATA_PROCESSING = new ReturnCode("9012", "{0}当前记录存在未完结业务");
    ReturnCode DATA_SELF_AUDIT = new ReturnCode("9013", "{0}不能审核自己提交的记录");

    ReturnCode ERROR = new ReturnCode("9999", "处理异常");

    /**
     * 成功返回
     */
    ReturnCode SUCCESS = new ReturnCode("0000", "处理成功");
    ReturnCode SUCCESS_IMPORT = new ReturnCode("0001", "成功新增{0}行数据");
    ReturnCode SUCCESS_UPDATE = new ReturnCode("0002", "成功更新{0}行数据");
    ReturnCode SUCCESS_DELETE = new ReturnCode("0003", "成功删除{0}行数据");
    ReturnCode SUCCESS_AUDITING = new ReturnCode("0004", "成功审核{0}行数据");
}
